﻿@model IEnumerable<TO3.Models.Match>

<table class="table">
    <tr>
        <th>
            Spiller 1
        </th>
        <th>
            Spiller 2
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Tournament.Name)
        </th>
        <th>
            Vinder
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TableId)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Round)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Player1CP)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Player2CP)
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Player1.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Player2.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tournament.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Winner.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TableId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Round)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Player1CP)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Player2CP)
        </td>
    </tr>
}

</table>
